/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * FrmAddEmployee.java
 *
 * Created on Dec 16, 2011, 11:23:52 AM
 */
package vn.edu.nuce.lms.ui;

/**
 *
 * @author Dell
 */
public class FrmAddEmployee extends javax.swing.JFrame {

    /** Creates new form FrmAddEmployee */
    public FrmAddEmployee() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        lblAdd = new javax.swing.JLabel();
        lblEmID = new javax.swing.JLabel();
        lblEmName = new javax.swing.JLabel();
        lblBirthDay = new javax.swing.JLabel();
        lblLevel = new javax.swing.JLabel();
        lblEmail = new javax.swing.JLabel();
        lblPhone = new javax.swing.JLabel();
        lblJoinDat = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        txtEmID = new javax.swing.JTextField();
        txtEmName = new javax.swing.JTextField();
        txtLevel = new javax.swing.JTextField();
        txtEmail = new javax.swing.JTextField();
        txtPhone = new javax.swing.JTextField();
        jDateChooser1 = new com.toedter.calendar.JDateChooser();
        txtJoinDay = new com.toedter.calendar.JDateChooser();
        txtDayOfLeave = new javax.swing.JTextField();
        txtBirthDay = new com.toedter.calendar.JDateChooser();
        btnAdd = new javax.swing.JButton();
        btnClose = new javax.swing.JButton();
        btnReset = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("ADD EMPLOYEE");

        lblAdd.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
        lblAdd.setForeground(new java.awt.Color(255, 0, 0));
        lblAdd.setText("Thêm Nhân Viên");
        lblAdd.setName("lblAdd"); // NOI18N

        lblEmID.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblEmID.setForeground(new java.awt.Color(0, 51, 255));
        lblEmID.setText("EmID");
        lblEmID.setName("lblEmID"); // NOI18N

        lblEmName.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblEmName.setForeground(new java.awt.Color(0, 51, 255));
        lblEmName.setText("EmName");
        lblEmName.setName("lblEmName"); // NOI18N

        lblBirthDay.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblBirthDay.setForeground(new java.awt.Color(0, 51, 255));
        lblBirthDay.setText("BirthDay");
        lblBirthDay.setName("lblBirthDay"); // NOI18N

        lblLevel.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblLevel.setForeground(new java.awt.Color(0, 51, 255));
        lblLevel.setText("Level");
        lblLevel.setName("lblLevel"); // NOI18N

        lblEmail.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblEmail.setForeground(new java.awt.Color(0, 0, 255));
        lblEmail.setText("Email");
        lblEmail.setName("lblEmail"); // NOI18N

        lblPhone.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblPhone.setForeground(new java.awt.Color(0, 0, 255));
        lblPhone.setText("Phone");
        lblPhone.setName("lblPhone"); // NOI18N

        lblJoinDat.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblJoinDat.setForeground(new java.awt.Color(0, 0, 255));
        lblJoinDat.setText("Join Day");
        lblJoinDat.setName("lblJoinDat"); // NOI18N

        jLabel9.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel9.setForeground(new java.awt.Color(0, 0, 255));
        jLabel9.setText("Day Of Leave");
        jLabel9.setName("jLabel9"); // NOI18N

        txtEmID.setName("txtEmID"); // NOI18N

        txtEmName.setName("txtEmName"); // NOI18N

        txtLevel.setName("txtLevel"); // NOI18N

        txtEmail.setForeground(new java.awt.Color(0, 0, 255));
        txtEmail.setName("txtEmail"); // NOI18N

        txtPhone.setForeground(new java.awt.Color(0, 0, 255));
        txtPhone.setName("txtPhone"); // NOI18N
        txtPhone.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtPhoneActionPerformed(evt);
            }
        });

        jDateChooser1.setName("jDateChooser1"); // NOI18N

        txtJoinDay.setForeground(new java.awt.Color(0, 0, 255));
        txtJoinDay.setName("txtJoinDay"); // NOI18N

        txtDayOfLeave.setForeground(new java.awt.Color(0, 0, 255));
        txtDayOfLeave.setName("txtDayOfLeave"); // NOI18N

        txtBirthDay.setName("txtBirthDay"); // NOI18N

        btnAdd.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        btnAdd.setForeground(new java.awt.Color(0, 0, 255));
        btnAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/vn/edu/nuce/lms/image/add.png"))); // NOI18N
        btnAdd.setText("Add");
        btnAdd.setToolTipText("");
        btnAdd.setName("btnAdd"); // NOI18N

        btnClose.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        btnClose.setForeground(new java.awt.Color(0, 0, 255));
        btnClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/vn/edu/nuce/lms/image/delete.png"))); // NOI18N
        btnClose.setText("Close");
        btnClose.setName("btnClose"); // NOI18N
        btnClose.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCloseActionPerformed(evt);
            }
        });

        btnReset.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        btnReset.setForeground(new java.awt.Color(0, 0, 255));
        btnReset.setIcon(new javax.swing.ImageIcon(getClass().getResource("/vn/edu/nuce/lms/image/refresh.png"))); // NOI18N
        btnReset.setText("Reset");
        btnReset.setName("btnReset"); // NOI18N
        btnReset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnResetActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnAdd)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(lblEmID)
                                .addComponent(lblEmName))
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(lblLevel)
                                .addComponent(lblBirthDay)))
                        .addGap(19, 19, 19)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtLevel, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(txtBirthDay, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtEmName, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(txtEmID, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE))))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(103, 103, 103)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel9)
                                    .addComponent(lblEmail))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtEmail, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                                    .addComponent(txtPhone, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                                    .addComponent(txtJoinDay, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                                    .addComponent(txtDayOfLeave, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(lblPhone)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 208, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(lblJoinDat)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 198, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(72, 72, 72))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(39, 39, 39)
                        .addComponent(btnReset)
                        .addGap(46, 46, 46)
                        .addComponent(btnClose)
                        .addGap(197, 197, 197))))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(193, Short.MAX_VALUE)
                .addComponent(lblAdd)
                .addGap(181, 181, 181))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(27, 27, 27)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblEmail))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblPhone)
                            .addComponent(txtPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(lblJoinDat)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel9))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(txtJoinDay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtDayOfLeave, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtEmID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblEmID))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblEmName)
                            .addComponent(txtEmName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblBirthDay)
                            .addComponent(txtBirthDay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtLevel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblLevel))))
                .addGap(60, 60, 60)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnAdd)
                    .addComponent(btnReset)
                    .addComponent(btnClose))
                .addGap(37, 37, 37))
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-687)/2, (screenSize.height-372)/2, 687, 372);
    }// </editor-fold>//GEN-END:initComponents

private void txtPhoneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtPhoneActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtPhoneActionPerformed

private void btnResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnResetActionPerformed
// TODO add your handling code here:
    txtEmID.setText("");
    txtEmName.setText("");
    txtEmail.setText("");
    txtLevel.setText("");
    txtBirthDay.setDate(null);
    txtDayOfLeave.setText("");
    txtPhone.setText("");
    txtJoinDay.setDate(null);
}//GEN-LAST:event_btnResetActionPerformed

private void btnCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCloseActionPerformed
// TODO add your handling code here:
    this.dispose();
}//GEN-LAST:event_btnCloseActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FrmAddEmployee.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FrmAddEmployee.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FrmAddEmployee.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FrmAddEmployee.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new FrmAddEmployee().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAdd;
    private javax.swing.JButton btnClose;
    private javax.swing.JButton btnReset;
    private com.toedter.calendar.JDateChooser jDateChooser1;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel lblAdd;
    private javax.swing.JLabel lblBirthDay;
    private javax.swing.JLabel lblEmID;
    private javax.swing.JLabel lblEmName;
    private javax.swing.JLabel lblEmail;
    private javax.swing.JLabel lblJoinDat;
    private javax.swing.JLabel lblLevel;
    private javax.swing.JLabel lblPhone;
    private com.toedter.calendar.JDateChooser txtBirthDay;
    private javax.swing.JTextField txtDayOfLeave;
    private javax.swing.JTextField txtEmID;
    private javax.swing.JTextField txtEmName;
    private javax.swing.JTextField txtEmail;
    private com.toedter.calendar.JDateChooser txtJoinDay;
    private javax.swing.JTextField txtLevel;
    private javax.swing.JTextField txtPhone;
    // End of variables declaration//GEN-END:variables
}
